<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta name="keywords" content="" />
<meta name="description" content="" />
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Event Management</title>
<link href="style.css" rel="stylesheet" type="text/css" media="screen" />
<style type="text/css">
<!--
body {
	background-image: url(images/water-drop-with-ripple.jpg);
	background-repeat: repeat;
}
a:link {
	color: #FFFFFF;
	text-decoration: none;
}
a:visited {
	text-decoration: none;
	color: #FFFFFF;
}
a:hover {
	text-decoration: none;
	color: #FFFFFF;
}
a:active {
	text-decoration: none;
	color: #FFFFFF;
}
-->
</style>
</head>
<body>
<div id="wrapper">
<div id="header">
  <div id="logo">
    <div align="center"><img src="images/watertitle.png" alt="" width="940" height="130" /></div>
  </div>
</div>
<!-- end #header -->
<div id="menu">
  <ul>
    <li> <a href="#">Home</a></li>
    <li><a href="#">About us</a></li>
    <li><a href="#">News</a></li>
    <li><a href="#">Events</a></li>
    <li><a href="#">Resources</a></li>
    <li><a href="#">Contact</a></li>
  </ul>
</div>
<!-- end #menu -->
<div id="page">
<div id="page-bgtop">
<div id="page-bgbtm">
<div id="content">
  <div class="post">
    <?php include("dbcon.php"); 
		
		$sql="INSERT INTO event (name, Date, Venue, Start_Time, End_Time)
		VALUES
		('$_POST[eName]','$_POST[date]','$_POST[venue]','$_POST[sTime]','$_POST[eTime]')";

		if (!mysql_query($sql,$con))
  		{
  			die('Error: ' . mysql_error());
		}
		
		$result = mysql_query("SELECT max(id) from event ");

		$row = mysql_fetch_array($result);
  			
		session_start();
		$_SESSION['Event_Id']=$row[0];
		mysql_close($con);
	
		
	?>
   
<script type="text/javascript">
	window.location="home.php";
</script>
    
    <div class="entry"></div>
  </div>
</div>
<!-- end #content -->
<div id="sidebar">
<div style="clear: both;">&nbsp;</div>
</li>
<li>
  <h2>&nbsp;</h2>
</li>
</ul>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<ul>
<li>
  <p>&nbsp;</p>
  <p>&nbsp;</p>
</div>
<!-- end #sidebar -->
<div style="clear: both;">&nbsp;</div>
</div>
</div>
</div>
<!-- end #page -->
</div>
<div id="footer">
  <p>Copyright (c) 2011,  All rights reserved. Design by The Urban Unit</a>.</p>
</div>
<!-- end #footer -->
</body>
</html>